1. Field of the Invention
The present invention relates to a surface inspection apparatus and method in which a camera including an image sensor is used to perform a surface inspection of defects, including damage, dirt and the like of various inspection objects, such as molded articles.
2. Description of the Related Art
In a related art, for example, in inspecting surface defects of inspection objects such as pressed articles, drawn articles, and rolled articles, cameras such as a CCD camera have previously been used. The CCD camera includes a line image sensor constituted by one-dimensionally arranging photoelectric conversion devices (line image sensor). The camera one-dimensionally scans the inspection object, and image data obtained in this manner is subjected to calculation processing and inspected.
In a two-dimensional image sensor for use in video cameras, in general, there are only several hundred image pickup pixels in a view field width direction. On the other hand, in a line image sensor, it is possible to integrate several thousand image pickup pixels in the view field width direction. Therefore, a line image sensor can perform surface inspection of broad inspection objects such as steel, paper, and film, which is impossible with a two-dimensional image sensor.
In the image sensor of the photoelectric conversion device of this type of camera, there is a variation in reading precision. This variation is caused by a difference in sensitivity of each photoelectric conversion device constituting the image sensor, and is referred to as a device dispersion, and this value is generally about 3%. In the above-described related-art surface inspection apparatus, unless there is a brightness change exceeding the device dispersion, fine defects cannot be detected. It is said that a visual light/shade detection precision is in a range of 1/1500 to 1/2000, therefore a surface inspection apparatus using the line image sensor has a precision of only {fraction (1/60)} of that of visual inspection, and it has been assumed to be impossible to replace visual inspections.
Therefore, various methods of compensating for the device dispersion of the image sensor have been considered. One example of a technique is known comprising: adding image data of a block including a plurality of pixels which are continuous in a main scanning direction in an image data string obtained by the line image sensor; and performing correlation calculation of added data of adjacent blocks.
However, a defect extending over the pixels adjacent to each other on one main scanning line can be detected in this method, but it is impossible to detect a defect extending over adjacent main scanning lines, and a defect extending over the pixels adjacent to each other on the main scanning line and also extending over the adjacent main scanning lines. Therefore, there has been a limitation in improvement of the inspecting precision.